import request from '@/utils/request'

/**申请时查询历史申请记录 */
export function getHistoryApplyList(skuId) {
  return request({
    url: `/system/skuSellerApply/getHistoryApplyList?skuId=${skuId}`,
  })
}

/**预约库存 */
export function reservationSku(data) {
  return request({
    url: '/distribution/skuDistributor/reservationSku',
    method: 'POST',
    data
  })
}

/**查询卖家积分 */
export function getBalanceByDistr(query) {
  return request({
    url: '/distribution/skuDistributor/getBalanceByDistr',
    params: query
  })
}

// 获取云池列表
export function skuDistributorGetCloudList(query) {
  return request({
    url: '/distribution/skuDistributor/getCloudList',
    method: 'get',
    params: query
  })
}

// // 获取云池列表
// export function skuDistributorSellerApply(data) {
//   return request({
//     url: '/distribution/skuDistributor/sellerApply',
//     method: 'post',
//     data
//   })
// }

export function skuDistributorSellerApply(data) {
  return request({
    url: '/system/skuSellerApply/sellerApply',
    method: 'post',
    data
  })
}


export function init(data) {
  return request({
    url: '/system/skuSellerApply/init',
    method: 'post',
    data
  })
}
